Optimal. Leaf size=82 \[ -\frac {A b-a B}{b (b d-a e) (a+b x)}+\frac {(B d-A e) \log (a+b x)}{(b d-a e)^2}-\frac {(B d-A e) \log (d+e x)}{(b d-a e)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {78}
\begin {gather*} -\frac {A b-a B}{b (a+b x) (b d-a e)}+\frac {\log (a+b x) (B d-A e)}{(b d-a e)^2}-\frac {(B d-A e) \log (d+e x)}{(b d-a e)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rubi steps
\begin {align*} \int \frac {A+B x}{(a+b x)^2 (d+e x)} \, dx &=\int \left (\frac {A b-a B}{(b d-a e) (a+b x)^2}+\frac {b (B d-A e)}{(b d-a e)^2 (a+b x)}+\frac {e (-B d+A e)}{(b d-a e)^2 (d+e x)}\right ) \, dx\\ &=-\frac {A b-a B}{b (b d-a e) (a+b x)}+\frac {(B d-A e) \log (a+b x)}{(b d-a e)^2}-\frac {(B d-A e) \log (d+e x)}{(b d-a e)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 69, normalized size = 0.84 \begin {gather*} \frac {\frac {(-A b+a B) (b d-a e)}{b (a+b x)}+(B d-A e) \log (a+b x)+(-B d+A e) \log (d+e x)}{(b d-a e)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 83, normalized size = 1.01
method | result | size |
default | \(-\frac {-A b +B a}{\left (a e -b d \right ) b \left (b x +a \right )}-\frac {\left (A e -B d \right ) \ln \left (b x +a \right )}{\left (a e -b d \right )^{2}}+\frac {\left (A e -B d \right ) \ln \left (e x +d \right )}{\left (a e -b d \right )^{2}}\) | \(83\) |
norman | \(-\frac {\left (A b -B a \right ) x}{a \left (a e -b d \right ) \left (b x +a \right )}+\frac {\left (A e -B d \right ) \ln \left (e x +d \right )}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}-\frac {\left (A e -B d \right ) \ln \left (b x +a \right )}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}\) | \(110\) |
risch | \(\frac {A}{\left (a e -b d \right ) \left (b x +a \right )}-\frac {B a}{\left (a e -b d \right ) b \left (b x +a \right )}-\frac {\ln \left (b x +a \right ) A e}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}+\frac {\ln \left (b x +a \right ) B d}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}+\frac {\ln \left (-e x -d \right ) A e}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}-\frac {\ln \left (-e x -d \right ) B d}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}\) | \(181\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 123, normalized size = 1.50 \begin {gather*} \frac {{\left (B d - A e\right )} \log \left (b x + a\right )}{b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}} - \frac {{\left (B d - A e\right )} \log \left (x e + d\right )}{b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}} + \frac {B a - A b}{a b^{2} d - a^{2} b e + {\left (b^{3} d - a b^{2} e\right )} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.85, size = 158, normalized size = 1.93 \begin {gather*} \frac {{\left (B a b - A b^{2}\right )} d - {\left (B a^{2} - A a b\right )} e + {\left (B b^{2} d x + B a b d - {\left (A b^{2} x + A a b\right )} e\right )} \log \left (b x + a\right ) - {\left (B b^{2} d x + B a b d - {\left (A b^{2} x + A a b\right )} e\right )} \log \left (x e + d\right )}{b^{4} d^{2} x + a b^{3} d^{2} + {\left (a^{2} b^{2} x + a^{3} b\right )} e^{2} - 2 \, {\left (a b^{3} d x + a^{2} b^{2} d\right )} e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 355 vs.
\(2 (63) = 126\).
time = 0.76, size = 355, normalized size = 4.33 \begin {gather*} \frac {A b - B a}{a^{2} b e - a b^{2} d + x \left (a b^{2} e - b^{3} d\right )} - \frac {\left (- A e + B d\right ) \log {\left (x + \frac {- A a e^{2} - A b d e + B a d e + B b d^{2} - \frac {a^{3} e^{3} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} + \frac {3 a^{2} b d e^{2} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} - \frac {3 a b^{2} d^{2} e \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} + \frac {b^{3} d^{3} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}}}{- 2 A b e^{2} + 2 B b d e} \right )}}{\left (a e - b d\right )^{2}} + \frac {\left (- A e + B d\right ) \log {\left (x + \frac {- A a e^{2} - A b d e + B a d e + B b d^{2} + \frac {a^{3} e^{3} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} - \frac {3 a^{2} b d e^{2} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} + \frac {3 a b^{2} d^{2} e \left (- A e + B d\right )}{\left (a e - b d\right )^{2}} - \frac {b^{3} d^{3} \left (- A e + B d\right )}{\left (a e - b d\right )^{2}}}{- 2 A b e^{2} + 2 B b d e} \right )}}{\left (a e - b d\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.86, size = 104, normalized size = 1.27 \begin {gather*} -\frac {{\left (B b d - A b e\right )} \log \left ({\left | \frac {b d}{b x + a} - \frac {a e}{b x + a} + e \right |}\right )}{b^{3} d^{2} - 2 \, a b^{2} d e + a^{2} b e^{2}} + \frac {\frac {B a}{b x + a} - \frac {A b}{b x + a}}{b^{2} d - a b e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.15, size = 94, normalized size = 1.15 \begin {gather*} \frac {A\,b-B\,a}{b\,\left (a\,e-b\,d\right )\,\left (a+b\,x\right )}-\frac {2\,\mathrm {atanh}\left (\frac {a^2\,e^2-b^2\,d^2}{{\left (a\,e-b\,d\right )}^2}+\frac {2\,b\,e\,x}{a\,e-b\,d}\right )\,\left (A\,e-B\,d\right )}{{\left (a\,e-b\,d\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________